Optimal. Leaf size=205 \[ -\frac {2 x^{-n/2}}{a n}+\frac {\sqrt {2} \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{a^{3/2} \sqrt {b-\sqrt {b^2-4 a c}} n}+\frac {\sqrt {2} \left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{a^{3/2} \sqrt {b+\sqrt {b^2-4 a c}} n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.27, antiderivative size = 205, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {1395, 1354,
1136, 1180, 211} \begin {gather*} \frac {\sqrt {2} \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{a^{3/2} n \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\sqrt {2} \left (\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}+b\right ) \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {\sqrt {b^2-4 a c}+b}}\right )}{a^{3/2} n \sqrt {\sqrt {b^2-4 a c}+b}}-\frac {2 x^{-n/2}}{a n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 1136
Rule 1180
Rule 1354
Rule 1395
Rubi steps
\begin {align*} \int \frac {x^{-1-\frac {n}{2}}}{a+b x^n+c x^{2 n}} \, dx &=-\frac {2 \text {Subst}\left (\int \frac {1}{a+\frac {c}{x^4}+\frac {b}{x^2}} \, dx,x,x^{-n/2}\right )}{n}\\ &=-\frac {2 \text {Subst}\left (\int \frac {x^4}{c+b x^2+a x^4} \, dx,x,x^{-n/2}\right )}{n}\\ &=-\frac {2 x^{-n/2}}{a n}+\frac {2 \text {Subst}\left (\int \frac {c+b x^2}{c+b x^2+a x^4} \, dx,x,x^{-n/2}\right )}{a n}\\ &=-\frac {2 x^{-n/2}}{a n}+\frac {\left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \text {Subst}\left (\int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+a x^2} \, dx,x,x^{-n/2}\right )}{a n}+\frac {\left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \text {Subst}\left (\int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+a x^2} \, dx,x,x^{-n/2}\right )}{a n}\\ &=-\frac {2 x^{-n/2}}{a n}+\frac {\sqrt {2} \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{a^{3/2} \sqrt {b-\sqrt {b^2-4 a c}} n}+\frac {\sqrt {2} \left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{a^{3/2} \sqrt {b+\sqrt {b^2-4 a c}} n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.13, size = 105, normalized size = 0.51 \begin {gather*} -\frac {4 x^{-n/2}-\text {RootSum}\left [c+b \text {$\#$1}^2+a \text {$\#$1}^4\&,\frac {c n \log (x)+2 c \log \left (x^{-n/2}-\text {$\#$1}\right )+b n \log (x) \text {$\#$1}^2+2 b \log \left (x^{-n/2}-\text {$\#$1}\right ) \text {$\#$1}^2}{b \text {$\#$1}+2 a \text {$\#$1}^3}\&\right ]}{2 a n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.23, size = 268, normalized size = 1.31
method | result | size |
risch | \(-\frac {2 x^{-\frac {n}{2}}}{a n}+\left (\munderset {\textit {\_R} =\RootOf \left (\left (16 a^{5} c^{2} n^{4}-8 a^{4} b^{2} c \,n^{4}+a^{3} b^{4} n^{4}\right ) \textit {\_Z}^{4}+\left (12 a^{2} b \,c^{2} n^{2}-7 a \,b^{3} c \,n^{2}+b^{5} n^{2}\right ) \textit {\_Z}^{2}+c^{3}\right )}{\sum }\textit {\_R} \ln \left (x^{\frac {n}{2}}+\left (-\frac {8 n^{3} a^{5} c^{2}}{a \,c^{3}-b^{2} c^{2}}+\frac {6 n^{3} b^{2} a^{4} c}{a \,c^{3}-b^{2} c^{2}}-\frac {n^{3} b^{4} a^{3}}{a \,c^{3}-b^{2} c^{2}}\right ) \textit {\_R}^{3}+\left (-\frac {5 n b \,a^{2} c^{2}}{a \,c^{3}-b^{2} c^{2}}+\frac {5 n \,b^{3} a c}{a \,c^{3}-b^{2} c^{2}}-\frac {n \,b^{5}}{a \,c^{3}-b^{2} c^{2}}\right ) \textit {\_R} \right )\right )\) | \(268\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1229 vs.
\(2 (169) = 338\).
time = 0.41, size = 1229, normalized size = 6.00 \begin {gather*} \frac {\sqrt {2} a n \sqrt {-\frac {{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} + b^{3} - 3 \, a b c}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2}}} \log \left (-\frac {4 \, {\left (b^{2} c - a c^{2}\right )} x x^{-\frac {1}{2} \, n - 1} + \sqrt {2} {\left ({\left (a^{3} b^{3} - 4 \, a^{4} b c\right )} n^{3} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} - {\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} n\right )} \sqrt {-\frac {{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} + b^{3} - 3 \, a b c}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2}}}}{x}\right ) - \sqrt {2} a n \sqrt {-\frac {{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} + b^{3} - 3 \, a b c}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2}}} \log \left (-\frac {4 \, {\left (b^{2} c - a c^{2}\right )} x x^{-\frac {1}{2} \, n - 1} - \sqrt {2} {\left ({\left (a^{3} b^{3} - 4 \, a^{4} b c\right )} n^{3} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} - {\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} n\right )} \sqrt {-\frac {{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} + b^{3} - 3 \, a b c}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2}}}}{x}\right ) - \sqrt {2} a n \sqrt {\frac {{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} - b^{3} + 3 \, a b c}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2}}} \log \left (-\frac {4 \, {\left (b^{2} c - a c^{2}\right )} x x^{-\frac {1}{2} \, n - 1} + \sqrt {2} {\left ({\left (a^{3} b^{3} - 4 \, a^{4} b c\right )} n^{3} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} + {\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} n\right )} \sqrt {\frac {{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} - b^{3} + 3 \, a b c}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2}}}}{x}\right ) + \sqrt {2} a n \sqrt {\frac {{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} - b^{3} + 3 \, a b c}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2}}} \log \left (-\frac {4 \, {\left (b^{2} c - a c^{2}\right )} x x^{-\frac {1}{2} \, n - 1} - \sqrt {2} {\left ({\left (a^{3} b^{3} - 4 \, a^{4} b c\right )} n^{3} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} + {\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} n\right )} \sqrt {\frac {{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2} \sqrt {\frac {b^{4} - 2 \, a b^{2} c + a^{2} c^{2}}{{\left (a^{6} b^{2} - 4 \, a^{7} c\right )} n^{4}}} - b^{3} + 3 \, a b c}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} n^{2}}}}{x}\right ) - 4 \, x x^{-\frac {1}{2} \, n - 1}}{2 \, a n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{x^{\frac {n}{2}+1}\,\left (a+b\,x^n+c\,x^{2\,n}\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________